<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex</title>
    <style>
* {
	box-sizing: border-box;
}

.container {
	display: flex;
	flex-wrap: wrap;
	border: 1px solid;
	width: 152px;
	height: 152px;
}

.item {
	display: inline-block;
	border: 1px solid;
	width: 50px;
	height: 50px;
	line-height: 50px;
	text-align: center;
}

    </style>
</head>

<body>
    <a href="https://www.ruanyifeng.com/blog/2015/07/flex-grammar.html">Flex 布局教程：语法篇</a>
    <br>
    <a href="http://www.ruanyifeng.com/blog/2015/07/flex-examples.html">Flex 布局教程：实例篇</a>
    <div class="container">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
        <div class="item">5</div>
        <div class="item">6</div>
        <div class="item">7</div>
    </div>
</body>

</html>